package me.pplay.playtalk.bean;

import java.io.Serializable;

import me.pplay.playtalk.data.Globals;

public class Chat implements Comparable<Chat>, Serializable{
	private int _id; 
	private int type = 0;  //type 0:点对点   未读消息      //好友1:同意 2：拒绝  3 请求加好友  4好友状态（上下线）   5: 群会话
	private int myskyid;
	private int skyid;
	private String icon;
	private String name;
	private String message;
	private String time = "";
	private int count = 0;
	private boolean isOperate = false;
	
	
	public Chat(){}
	public Chat(int type,int skyid, String name){
		this.myskyid  	= Globals.skyid;
		this.type		= type;
		this.skyid		= skyid;
		this.name		= name;
		this.time		= System.currentTimeMillis() + "";
	}
	
	/**
	 * @param db
	 */
	public Chat(int type,int skyid, String icon,  String name,String message, String time){
		this.myskyid  	= Globals.skyid;
		this.type		= type;
		this.skyid		= skyid;
		this.icon		= icon;
		this.name		= name;
		this.message	= message;
		this.time		= time;
	}

	public Chat(int _id, int type, int skyid, String icon,  String name,String message, String time){
		this._id  		= _id;
		this.myskyid  	= Globals.skyid;;
		this.type		= type;
		this.skyid		= skyid;
		this.icon		= icon;
		this.name		= name;
		this.message	= message;
		this.time		= time;
	}
	
//	public Chat(int type, int skyId, int skyid, String icon,  String name,String message, String time){
//		this.skyid  	= skyId;
//		this.type       = type;
//		this.skyid		= skyid;
//		this.icon		= icon;
//		this.name		= name;
//		this.message	= message;
//		this.time		= time;
//	}
	
	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int get_id() {
		return _id;
	}

	public void set_id(int _id) {
		this._id = _id;
	}

	public int getMyskyid() {
		return myskyid;
	}


	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public int getSkyid() {
		return skyid;
	}

	public void setSkyid(int skyid) {
		this.skyid = skyid;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}
	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public void setMyskyid(int myskyid) {
		this.myskyid = myskyid;
	}

	@Override
	public int compareTo(Chat another) {
		// TODO Auto-generated method stub
		return 0;
	}

	public boolean isOperate() {
		return isOperate;
	}

	public void setOperate(boolean isOperate) {
		this.isOperate = isOperate;
	}

}
